package com.ruoyi.classes.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.Objects;

/**
 * 学生班级对象 class_student_relationship
 *
 * @author ruoyi
 * @date 2025-04-10
 */

public class ClassStudentRelationship extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long relationshipId;

    /** 课程id */
    @Excel(name = "课程id")
    private Long classId;

    /** 学生id */
    @Excel(name = "学生id")
    private Long studentId;

    public void setRelationshipId(Long relationshipId)
    {
        this.relationshipId = relationshipId;
    }

    public Long getRelationshipId()
    {
        return relationshipId;
    }

    public void setClassId(Long classId)
    {
        this.classId = classId;
    }

    public Long getClassId()
    {
        return classId;
    }

    public void setStudentId(Long studentId)
    {
        this.studentId = studentId;
    }

    public Long getStudentId()
    {
        return studentId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("relationshipId", getRelationshipId())
                .append("classId", getClassId())
                .append("studentId", getStudentId())
                .toString();
    }
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ClassStudentRelationship that = (ClassStudentRelationship) o;
        return Objects.equals(relationshipId, that.relationshipId) &&
                Objects.equals(classId, that.classId) &&
                Objects.equals(studentId, that.studentId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(relationshipId, classId, studentId);
    }

}
